package lab02.Test36;

/**
 * Created by 李晓容 on 2017/11/9.
 */
public class Undergraduate extends Student {
    @Override
    String calGrade() {
        //得到该生的平均成绩
        double avg=calAverage();
        if (avg>80&&avg<=100)
            grade="优秀";
        else if (avg>=70&&avg<80)
            grade="lianghao";
        else if (avg>=60&&avg<70)
            grade="yiban";
        else if (avg>=50&&avg<60)
            grade="及格";
        else if (avg<50)
            grade="不及格";
        return grade;
    }
}
